package pl.maciejziarko.mshare.service;

import org.apache.shiro.authz.annotation.RequiresRoles;
import pl.maciejziarko.mshare.domain.Resource;
import pl.maciejziarko.mshare.service.exception.InvalidResourceException;
import pl.maciejziarko.mshare.service.exception.ResourceNotFoundException;
import pl.maciejziarko.mshare.service.exception.ResourceServiceException;

/**
 * @author Maciej Ziarko
 */
public interface ResourceService {

    Resource getResource(long id) throws ResourceNotFoundException, ResourceServiceException;

    Resource addResource(Resource resource) throws ResourceServiceException, InvalidResourceException;

    void removeAllResources() throws ResourceServiceException;

    long countResources() throws ResourceServiceException;

}
